﻿import * as types from './actionTypes'

export const setMsgType = msgType => ({ type: types.SET_MSG_TYPE, msgType });

export const setMsgContent = msg => ({ type: types.SET_MSG_CONTENT, msg });

export const sendMsg = (dispatch) => ({ type: types.SEND_MSG, dispatch});

export const check = (department, section, teacher) =>
    ({ type: types.CHECK, department, section, teacher });

export const expand = (department, section) =>
    ({ type: types.EXPAND, department, section });

export const removeCandidate = candidate =>
    ({ type: types.REMOVE_CANDIDATE, candidate });

export const clearCandidates = () =>
    ({ type: types.CLEAR_CANDIDATES });

export const togglePicker = () =>
    ({ type: types.TOGGLE_PICKER });

export const toggleDepVisible = () =>
    ({ type: types.TOGGLE_DEPARTMENT });

export const clearMsg = () => ({ type: types.CLEAR_MSG });
 